import React, {useState} from "react"

export const StateDemo = () => {
  const [count, setCount] = useState(0)
  return (
    <>
      当前计数:{count}
      <button onClick={() => setCount(count+1)}>+1</button>
      <button onClick={() => setCount(count-1)}>-1</button>
    </>
  )
}